1. Field of the Invention
The present invention relates to a method, system, and article of manufacture for managing write requests to data sets in a primary volume subject to being copied to a secondary volume.
2. Description of the Related Art
Disaster recovery systems typically address two types of failures, a sudden catastrophic failure at a single point-in-time or data loss over a period of time. In both types of disasters, updates to volumes may be lost. To assist in recovery of data updates, a copy of data may be provided at a remote location. Such dual or shadow copies are typically made as the application system is writing new data to a primary storage device. Different copy technologies may be used for maintaining remote copies of data at a secondary site, such as International Business Machine Corporation's (“IBM”) Extended Remote Copy (XRC), Coupled XRC (CXRC), Global Copy, and Global Mirror Copy.
In data mirroring systems, data is maintained in volume pairs. A volume pair is comprised of a volume in a primary storage device and a corresponding volume in a secondary storage device that includes an identical copy of the data maintained in the primary volume. Primary and secondary storage controllers may be used to control access to the primary and secondary storage devices.
In many application programs, such as database systems, certain writes cannot occur unless a previous write occurred; otherwise the data integrity would be jeopardized. Such a data write whose integrity is dependent on the occurrence of previous data writes is known as a dependent write. Volumes in the primary and secondary storages are consistent when all writes have been transferred in their logical order, i.e., all dependent writes transferred first before the writes dependent thereon. A consistency group is a collection of updates to the primary volumes such that dependent writes are secured in a consistent manner. The consistency time is the latest time to which the system guarantees that updates to the secondary volumes are consistent. The consistency group includes all dependent writes as of a point-in-time written to the remote or secondary site in the order in which they were written to the primary devices. The consistency group further has a consistency time for all data writes in a consistency group having a time stamp equal or earlier than the consistency time stamp. Consistency groups maintain data consistency across volumes and storage devices. Thus, when data is recovered from the secondary volumes, the recovered data will be consistent as of the point-in-time of the consistency group.
A storage controller will form a consistency group of data in a primary volume to mirror to a secondary volume by quiescing writes and indicating the data in the consistency group to mirror in an out-of-synch bitmap. The storage controller will then start copying data in a primary volume indicated in the out-of-synch bitmap to a secondary volume and at the same time process write requests to the primary volume. Writes executed against the primary volume are recorded in a change recording bitmap, but not copied to the secondary volume until the next consistency group is formed. If a write request is directed to a target track indicated in the out-of-synch bitmap as not yet copied to the secondary volume, then the write request will be delayed until the current version of the track in the primary volume or cache is copied over to the secondary volume. After the current version of the track in the primary volume is copied, the write request may proceed to update the track. In this way, writes are delayed to allow data in the consistency group to be copied to a remote site in a consistent manner.
There is a need in the art for improved techniques for handling write requests to data sets that are in a consistency group that are in the process of being mirrored to a secondary volume.